<!DOCTYPE html>
<html lang="zh-CN" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
    <script type="text/javascript">
      function Person(name, age, sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
      }
      Person.prototype.sayHi = function () {
        console.log('Hi I am ' + this.name);
      }
      var person = new Person('叶建新', 18, '女');
      var yejianxin = {}
      for(var key in person.protoype) {
        yejianxin[key] = person[key];
      }
      console.log(yejianxin);
    </script>
  </body>
</html>
